<%@ page language="java" import="java.util.*,java.net.URLDecoder" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String loginName="";
String uid="";
Cookie[] cookArr = request.getCookies();
if(cookArr!=null){
	for(Cookie c:cookArr){
		if(c.getName().equals("LOGINNAME")){
			loginName = URLDecoder.decode(c.getValue(),"UTF-8");
		}
		if(c.getName().equals("UID")){
			uid = c.getValue();
		}
		c.getValue();
	}
}
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>直接购买确认订单</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="css/orders.css"/>
  </head>
    <script type="text/javascript">
		function my(){
			var msg = '${MSG}';
			if(msg!=""){
				alert(msg);
			}
		}
		
	 	
	</script>
  <body >
	<form action="<%=basePath%>orders/addOrders.do" method="post">
			<div class="big">
				<div class="head"><h2>确认订单</h2></div>
				<hr />
				<div class="main">
					<div class="main_left">
						<ul style="list-style: none;">
							<li>收货地址：</li>
							<li id="sname">商品名称：</li>
							<li id="picture">商品图片：</li>
							<li id="price">商品单价：</li>
							<li id="number">购买数量：</li>
							<li>总价:</li>
						</ul>
					</div>
					<div class="main_right">
						<ul style="list-style: none;">
							<li id="adr">
								${address.name}&nbsp;&nbsp;&nbsp;${address.phone}&nbsp;<br>${address.province}${address.city}${address.district}${address.addr}<br><a href="<%=basePath%>address/addressList.do?uid=<%=uid%>&shop_id=${shop.shop_id }&gnumber=${gnumber}">编辑地址</a>
							</li>
							<li>
								<input type="text" name="sname" value="${shop.sname }" readonly="readonly">
							</li>
							<li id="pic">
								<img  src="${shop.picture }" width="100px" height="100px">
    							<input type="hidden" name="picture" value="${shop.picture }">
    						</li>
							<li>
								<input type="text" name="price" value="${shop.price }" readonly="readonly">
							</li>
							<li>
								<input type="text" name="gnumber" value="${gnumber }" readonly="readonly">
							</li>
							<li>
								<input type="text" name="gmoney" value="${money }" readonly="readonly">
							</li>
							
						</ul>
						
					</div>
				</div>
				<div class="footer">
					<input type="hidden" name="aid" value="${address.aid }">
    				<input type="hidden" name="shop_id" value="${shop.shop_id }">
    				<input type="hidden" name="uname" value="<%=loginName %>">
					<input class="bt1" type="submit" value="付款">
				</div>
			</div>
		</form>
  </body>
</html>
